import Vue from 'vue';
let BoxFirst =  Vue.component('box-first',{
    props:{
        boxName:{
            default:'这是一个空的盒子'
        },
        s:{
            default(){
                return this.search
            }
        }
    },
    name:"boxFirst",
    description:"盒子",
    inject:['search'],
    data(){
        return{
            t:new Date().getTime()
        }
    },
    watch:{
        search:{
            handler(n){
                console.log(n,'0000');
            },
            deep:true
        }

    },
    render(create){
        return create(
            'h3',
            this.boxName+'<br/>'+this.t,
            {
                className:"box1"
            }
        )
    },
    created() {
    }
});

export default BoxFirst;

